<!--{subtemplate shop/sub/header}-->
<!--{subtemplate shop/sub/navigation_left}-->
<div class="row">
<!--{if $iCart > 0}-->
	<!--{eval $i = 0;}-->
	<!--{loop $shopID $keys $values}-->
    <!--{eval $i++;}-->
	<div class="detail_box" id="cart-{eval echo md5($i);}">
    	<h4>
        	<i class="head_box_style"></i><!--{lang don_hang_cua_shop}-->
            <span><a href="<!--{eval echo md5($i);}-->" class="delete-cart" title="{lang xoa_gio_hang_cua_shop}"></a></span>
        </h4>
        <div class="delete-cart-box" id="delete-cart-box-{eval echo md5($i);}" title="{lang xoa_gio_hang_cua_shop}"><!--{lang ban_chac_chan_se_xoa_cart}--></div>
        <div class="cartContent">
        	<div class="cartitems">
            <!--{eval $totalCost = 0;}-->
            <!--{loop $values $key $value}-->
            <!--{eval
            	$totalCost += $value['cost'];
                $iShop = $value['sid'];
            }-->
                <div class="div-table" id="item-$value['pid']">
                    <div class="div-table-row">
                        <div class="div-table-col width_140"><img src="<!--{$value['image']}-->" width="140" height="140" alt="" /></div>
                        <div class="div-table-col">
                        	<p><a href="shop.php?mod=view&amp;name=<!--{eval echo locdau($value['pname']);}-->&amp;pid=<!--{$value['pid']}-->"><b><!--{$value['pname']}--></b></a></p>
                            <p><!--{lang gia_ban}<b>{$value['pprice']}--></b></p>
                            <div class="clear"></div>
                            <br />
                            <div class="text-quantity"><!--{lang so_luong}--></div>
                            <div class="quantity">
                                <input id="quantity-$value['pid']" class="q" type="text" maxlength="3" value="$value['quantity']" readonly />
                                <a href="javascript:;" onclick="increase('#quantity-' + $value['pid'], $value['pquantity']);" name="$value['pid']" rel="{eval echo md5($i);}" class="recount">+</a>
                                <a href="javascript:;" onclick="decrease('#quantity-' + $value['pid']);" name="$value['pid']" rel="{eval echo md5($i);}" class="recount">-</a>
                            </div>
                            <div class="clear"></div>
                            <p id="money-$value['pid']"><!--{lang thanh_tien}--></p>
                            <p class="removeitem"><a href="$value['sid']" class="iremove" rel="{eval echo md5($i);}" name="$value['pid']"><!--{lang xoa_khoi_gio_hang}--></a></p>
                        </div>
                    </div>
                </div>
                <div class="hr" id="hr-$value['pid']"></div>
            <!--{/loop}-->
            	<div class="note">
                	<!--{lang ghi_chu}-->
                    <p><textarea name="{eval echo md5($i);}" class="note" id="input-{eval echo md5($i);}"></textarea></p>
                </div>
        	</div>
            <div class="cartForm">
            	<div class="head_total"><!--{lang tong_tien}--><i id="re-{eval echo md5($i);}"><!--{eval echo FormatNumber($totalCost);}--></i></div>
                <div class="clear"></div>
                <form action="" method="post" name="{eval echo md5($i);}" id="form-{eval echo md5($i);}" class="form2">
                	<input type="hidden" name="sid" id="{eval echo md5($i);}" value="{$iShop}" />
                    <input type="hidden" name="totalprice" value="{$totalCost}" />
                    <p class="first">
                        <label><!--{lang nguoi_nhan_hang}--></label>
                        <input type="text" name="name" id="name-{eval echo md5($i);}" size="30" value="{$_G['member']['realname']}" />
                    </p>
                    <p>
                        <label for="email">Email</label>
                        <input type="text" name="email" id="email" size="30" value="$_G['member']['email']" readonly="readonly" />
                    </p>
                    <p>
                        <label for="tel"><!--{lang dien_thoai}--></label>
                        <input type="text" name="tel" id="tel" size="30" value="$_G['member']['mobile']" />
                    </p>
                    <p>
                        <label><!--{lang dia_chi_giao_nhan}--></label>
                        <input type="text" name="address" id="address-{eval echo md5($i);}" size="30" />
                    </p>
                    <p>
                        <label for="city"><!--{lang tinh_thanh_pho}--></label>
                        <select name="city" id="city-{eval echo md5($i);}" class="city" title="{eval echo md5($i);}">
                            <option value="0"><!--{lang chon_tinh_thanh}--></option>
                        <!--{loop $provice $did $dval}-->
                            <option value="$did">$dval['name']</option>
                        <!--{/loop}-->
                        </select>
                    </p>
                    <p>
                        <label for="dist"><!--{lang quan_huyen}--></label>
                        <select name="dist" id="dist-{eval echo md5($i);}">
                            <option value=""><!--{lang chon_quan_huyen}--></option>
                        </select>
                    </p>
                    <p class="none"><textarea name="note" id="note-{eval echo md5($i);}"></textarea></p>
                    <p class="submit"><button type="submit" class="submit" value="{eval echo md5($i);}"><!--{lang thanh_toan}--></button></p>
                </form>
            </div>
        	<div class="clear"></div>
        </div>
    </div>
	<!--{/loop}-->
<!--{else}-->
	<div class="detail_box">
    	<h4><i class="head_box_style"></i><!--{$profile_title}--></h4>
        <div class="emptycart">
        	<!--{lang cart_empty}-->
            <p class="button"><a href="/" class="zocial buy"><span><!--{lang tiep_tuc_mua_hang}--></span></a></p>
        </div>
    </div>
<!--{/if}-->
</div>
<!--{subtemplate shop/sub/footer}-->